Skip to content

Change changeset to class#107

Merged
krbarnes merged 2 commits intomasterfrom
changeset-class
Aug 15, 2018
Merged

Change changeset to class#107
krbarnes merged 2 commits intomasterfrom
changeset-class

Conversation

@krbarnes
Copy link
Copy Markdown
Contributor

Changing TableSectionChangeSet from a struct to class.

Since Swift 4.1 we have seen many crashes in HostCell.isEqual. None of the crashes make sense, but the crash is a SEGV_ACCERR which implies that multiple threads are accessing the same memory.

Changing the change set from struct to class and eliminating the mutating functions maybe makes these crashes go away.

@krbarnes krbarnes requested review from g-Off and raulriera August 14, 2018 18:56
cellUpdater(cell.view, state)
}

@inline(never)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a previous attempt to fix the same crash. It did nothing.

// Compares two arrays of TableSections and produces the operations
// required to go from one to the other
public struct TableSectionChangeSet {
public class TableSectionChangeSet {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final? ❤️

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally

@krbarnes krbarnes merged commit 5a06c2f into master Aug 15, 2018
@krbarnes krbarnes deleted the changeset-class branch August 15, 2018 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants